﻿@{
    if (Session["ListViewedProduct"] != null)
    {
        List<CoreData.Product> ListViewedProduct = (List<CoreData.Product>)Session["ListViewedProduct"];
    <div class="viewed-product">
        <div class="viewed-tiny-product">
            
            <h5>
                Đã xem (@ListViewedProduct.Count)</h5>
            <ul>
                @foreach (var item in ListViewedProduct)
                {
                    <li>
                        <div class="viewed-product-img">
                            <a href="@Url.RouteUrl("product_details", new { Id = item.ID, Link = item.Link })">
                                <img src="@Url.Content("~/Media/Product/" + @item.Image)" alt="@item.Image" />
                            </a>
                        </div>
                        <a class="viewed-product-link" href="@Url.RouteUrl("product_details", new { Id = item.ID, Link = item.Link })">@item.Name</a>
                    </li>
                }
            </ul>
        </div>
    </div>
    }
}
